package com.xqiapp.jsp.config;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * Created by rwrwd7 on 2017/9/21.
 */
public class DataSourceDynamic extends AbstractRoutingDataSource {

    @Override
    protected Object determineCurrentLookupKey() {
        String routeKey = DataSourceRouteHolder.getDataSourceRouteKey();
        System.out.println("------------------Execute current key:"+routeKey);
        return routeKey;
    }

}
